import request from '@/utils/request';

// 获取头部信息
export const getHeaderInfo = () => request({
  url: '/screen/data/getScreenData',
  method: 'get',
});

// 获取作业区域列表
export const getWorkAreaList = (pageSize = 20) => request({
  url: '/screen/data/listScreenArea',
  method: 'get',
  params: {
    pageSize,
    pageNum: 1,
  },
});

// 获取人员列表
export const getPersonList = (areaId, pageSize = 5000) => request({
  url: '/screen/data/listEmployeeScreen',
  method: 'get',
  params: {
    areaId,
    pageSize,
    pageNum: 1,
  },
});

// 获取车辆列表
export const getCarList = (areaId, pageSize = 5000) => request({
  url: '/screen/data/listCar',
  method: 'get',
  params: {
    areaId,
    pageSize,
    pageNum: 1,
  },
});

// 获取环卫站
export const getSanitationStationList = (areaId, pageSize = 5000) => request({
  url: '/screen/data/listBucket',
  method: 'get',
  params: {
    areaId,
    pageSize,
    pageNum: 1,
  },
});

// 获取考勤信息
export const getAttendanceMonitor = () => request({
  url: '/screen/data/getAttendanceMonitor',
  method: 'get',
});

// 获取环卫站检测信息
export const getBucketMonitor = () => request({
  url: '/screen/data/getBucketMonitor',
  method: 'get',
});

// 获取作业检测
export const getWorkMonitor = () => request({
  url: '/screen/data/getWorkMonitor',
  method: 'get',
});

// 获取垃圾站气体检测信息
export const getGasMonitor = () => request({
  url: '/screen/data/getGasMonitor',
  method: 'get',
});

// 获取地图坐标信息
export const getMapCoordsInfo = (areaId) => request({
  url: '/screen/data/getMapData',
  method: 'get',
  params: {
    areaId
  },
});

export const getWarnList = () => request({
  url: '/system/alarm/list',
  method: 'get',
})

export const readWarn = (query) => request({
  url: '/system/alarm/read',
  method: 'put',
  params: query,
})

export const getNotice = () => request({
  url: '/system/notice/list',
  method: 'get'
})

export const getMapEmployeeList = (id) => request({
  url: '/screen/data/getMapEmployeeList',
  method: 'get',
  params: {
    employeeId: id,
  },
})

export const getMapCarList = (id) => request({
  url: '/screen/data/getMapCarList',
  method: 'get',
  params: {
    carId: id,
  }
})
